package com.mr.dao.entity.customer;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToMany;

import com.mr.constants.Tables;
import com.mr.dao.entity.BaseEntity;

@Entity(name = Tables.CUSTOMER)
public class Customer extends BaseEntity {
	private static final long serialVersionUID = 2170447272046544884L;
	private String user_email;
	private String user_password;
	private Calendar date_created;
	@OneToMany(mappedBy = "customer_account", cascade = CascadeType.ALL)
	private List<Shipping> shippings = new ArrayList<Shipping>(0);
	@OneToMany(mappedBy = "customer_account", cascade = CascadeType.ALL)
	private List<Billing> billings = new ArrayList<Billing>(0);
	@OneToMany(mappedBy = "customer_account", cascade = CascadeType.ALL)
	private List<Order> orders = new ArrayList<Order>(0);
	@OneToMany(mappedBy = "customer_account", cascade = CascadeType.ALL)
	private List<Promo> promos = new ArrayList<Promo>(0);

	public String getUser_email() {
		return user_email;
	}

	public void setUser_email(String user_email) {
		this.user_email = user_email;
	}

	public String getUser_password() {
		return user_password;
	}

	public void setUser_password(String user_password) {
		this.user_password = user_password;
	}

	public Calendar getDate_created() {
		return date_created;
	}

	public void setDate_created(Calendar date_created) {
		this.date_created = date_created;
	}

	public List<Shipping> getShippings() {
		return shippings;
	}

	public void setShippings(List<Shipping> shippings) {
		this.shippings = shippings;
	}

	public List<Billing> getBillings() {
		return billings;
	}

	public void setBillings(List<Billing> billings) {
		this.billings = billings;
	}

	public List<Order> getOrders() {
		return orders;
	}

	public void setOrders(List<Order> orders) {
		this.orders = orders;
	}

	public List<Promo> getPromos() {
		return promos;
	}

	public void setPromos(List<Promo> promos) {
		this.promos = promos;
	}

}
